/*
package tmytest;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

*/
/**
 * Created by Administrator on 2016/3/24.
 *//*

@SpringBootApplication
@Controller
public class Test {
//    @RequestMapping("/")
//    public String greeting() {
//        return "Hello World!";
//    }
//    @RequestMapping("/users/{username}")
//    public String userProfile(@PathVariable("username") String username) {
//        return String.format("user %s", username);
//    }
//
//    @RequestMapping("/posts/{id}")
//    public String post(@PathVariable("id") int id) {
//        return String.format("post %d", id);
//    }
//
//    @RequestMapping(value = "/login", method = RequestMethod.GET)
//    public String loginGet() {
//        return "Login Page";
//    }
//
//    @RequestMapping(value = "/login", method = RequestMethod.POST)
//    public String loginPost() {
//        return "Login Post Request";
//    }

    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name, Model model) {
        model.addAttribute("name", name);
        return "hello";
    }
    public static void main(String[] args) {
        SpringApplication.run(Test.class, args);
    }
}
*/
